<template>
  <div class="common-layout">
    <el-container>
      <el-aside :width="store.state.homeview.navBool">
        <AsideLeft></AsideLeft>
      </el-aside>
      <el-container>
        <el-header>
          <HeaderRight></HeaderRight>
        </el-header>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup lang="ts">
import AsideLeft from '../components/AsideLeft.vue'
import HeaderRight from '../components/HeaderRight.vue'
import { useStore } from "vuex";
// 得到store对象
const store = useStore();
</script>

<style lang="scss" scoped>
.common-layout {
  .el-aside {
    background-color: pink;
  }

  .el-header {
    background-color: gold;
  }

  .el-main {
    background-color: burlywood;
  }
}

// 高度100%
.el-aside,
.el-container,
.common-layout,
#app,
body,
html {
  height: 100%;
  background-color: #545c64;
}
</style>